#include "headfile.h"
distance_cs distance_date;
float distance = 0;
void loop() {}
void callback()
{
  distance = distance_date.get_distance();
}
void main()
{
  Serial.begin(115200);
  motor_cs motor_date;
  gray_cs gray_date;

  Timer1.initialize(500000);
  Timer1.attachInterrupt(callback);
  while (1)
  {
    gray_date.adc_loadvalue();
    motor_date.motor_control(gray_date.sensor1, gray_date.sensor2, distance);
  }
}
